<%-- 
    Document   : altPaciente
    Created on : 20/08/2013, 22:19:58
    Author     : Thiago
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
    <head>
        <title>SorriDent - O seu consultório odontológico em Florianópolis</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- Bootstrap -->
        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
        <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
        <link href="/Consultorio/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="/Consultorio/css/estilo.css" rel="stylesheet" media="screen">

        <!-- JavaScript plugins (requires jQuery) -->
        <script src="http://code.jquery.com/jquery.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="/Consultorio/js/bootstrap.min.js"></script>

        <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
        <script src="/Consultorio/js/respond.js"></script>
    </head>
    <body>
        <div class="container" style="margin-top: 40px">
            <div class="panel panel-primary">
                <div class="conteudo_admin">
                    <form method="POST" action="/Consultorio/ServletPaciente?cmd=alterar">
                        <fieldset>
                            <legend>Alterar dados do paciente</legend>
                            <input type="hidden" name="id" value="${paciente.id}" />
                            <div class="campoForm clear" style="width:450px">
                                <label for="inputNome">Nome:</label>
                                <input type="text" class="form-control" name="nome" value="${paciente.nome}">
                            </div>
                            <div class="campoForm clear" style="width:250px">
                                <label for="inputLogin">Login:</label>
                                <input type="text" value="${paciente.usuario.login}" class="form-control" name="login">
                            </div>
                            <div class="campoForm" style="width:200px">
                                <label for="inputSenha">Senha:</label>
                                <input type="password" value="${paciente.usuario.senha}" class="form-control" name="senha">
                            </div>
                            <div class="checkbox clear" style="margin-left:15px">
                                <label>
                                    <input type="checkbox" name="checkEnviaEmail"> Enviar login e senha para o e-mail do paciente?
                                </label>
                            </div>
                            <div class="campoForm clear" style="width:250px">
                                <label for="convenio">Convênio:</label>
                                <select class="form-control" name="convenio">
                                    <option></option>
                                    <c:forEach var="convenio" items="${convenios}">
                                        <option value="${convenio.id}">${convenio.nome}</option>  
                                    </c:forEach>
                                </select>                
                            </div>
                            <div class="campoForm" style="width:200px">
                                <label for="inputCobertura">Cobertura:</label>
                                <select class="form-control" name="cobertura">
                                    <option></option>
                                    <c:forEach var="convenio" items="${convenios}">
                                        <option value="${convenio.id}">${convenio.cobertura}</option>
                                    </c:forEach>
                                </select>  
                            </div>
                            <div class="campoForm clear" style="width:250px">
                                <label for="inputCPF">CPF:</label>
                                <input type="text" class="form-control" name="cpf" value="${paciente.cpf}">
                            </div>
                            <div class="campoForm" style="width:200px">
                                <label for="inputTelefone">Telefone:</label>
                                <input type="text" class="form-control" name="telefone" value="${paciente.telefone}">
                            </div>
                            <div class="campoForm clear" style="width:250px">
                                <label for="inputEmail">E-mail:</label>
                                <input type="text" class="form-control" name="email" value="${paciente.email}">
                            </div>
                            <div class="campoForm" style="width:200px">
                                <label for="inputData">Data de nascimento:</label>
                                <input type="text" value="<fmt:formatDate value='${paciente.dataNasc}' pattern='dd/MM/yyyy'/>" class="form-control" name="data">
                            </div>
                            <legend>Endereço</legend>
                            <input type="hidden" name="idEndereco" value="${paciente.endereco.id}" />
                            <div class="campoForm clear" style="width:250px">
                                <label for="inputRua">Rua</label>
                                <input type="text" value="${paciente.endereco.rua}"  class="form-control" name="rua">
                            </div>
                            <div class="campoForm" style="width:200px">
                                <label for="inputBairro">Bairro</label>
                                <input type="text" value="${paciente.endereco.bairro}" class="form-control" name="bairro">
                            </div>
                            <div class="campoForm clear" style="width:250px">
                                <label for="inputCidade">Cidade</label>
                                <input type="text" value="${paciente.endereco.cidade}"  class="form-control" name="cidade">
                            </div>
                            <div class="campoForm" style="width:200px">
                                <label for="inputEstado">Estado</label>
                                <input type="text" value="${paciente.endereco.estado}" class="form-control" name="estado">
                            </div>
                            <div class="campoForm clear" style="width: 250px">
                                <label for="inputCEP">CEP</label>
                                <input type="text" value="${paciente.endereco.cep}" class="form-control" name="cep" placeholder="00000-000">
                            </div>
                            <div class="clear"></div>
                            <input type="submit" value="Alterar" class="btn btn-primary btn-lg" style="margin-left: 15px">
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </body>
</html>
